/*
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.aliyuncs.dyvms.transform.v20170620;

import com.aliyuncs.dyvms.model.v20170620.QueryCustInfoResponse;
import com.aliyuncs.dyvms.model.v20170620.QueryCustInfoResponse.Data;
import com.aliyuncs.transform.UnmarshallerContext;


public class QueryCustInfoResponseUnmarshaller {

	public static QueryCustInfoResponse unmarshall(QueryCustInfoResponse queryCustInfoResponse, UnmarshallerContext _ctx) {
		
		queryCustInfoResponse.setRequestId(_ctx.stringValue("QueryCustInfoResponse.RequestId"));
		queryCustInfoResponse.setCode(_ctx.stringValue("QueryCustInfoResponse.code"));

		Data data = new Data();
		data.setCustId(_ctx.longValue("QueryCustInfoResponse.data.CustId"));
		data.setPartnerId(_ctx.longValue("QueryCustInfoResponse.data.PartnerId"));
		data.setUserTag(_ctx.longValue("QueryCustInfoResponse.data.UserTag"));
		data.setUserTag2(_ctx.longValue("QueryCustInfoResponse.data.UserTag2"));
		data.setCustName(_ctx.stringValue("QueryCustInfoResponse.data.CustName"));
		data.setOsStatus(_ctx.integerValue("QueryCustInfoResponse.data.OsStatus"));
		data.setCertifyType(_ctx.integerValue("QueryCustInfoResponse.data.CertifyType"));
		data.setContactPhone(_ctx.stringValue("QueryCustInfoResponse.data.ContactPhone"));
		queryCustInfoResponse.setData(data);
	 
	 	return queryCustInfoResponse;
	}
}